package com.tmpt.dto;

import com.inspiresoftware.lib.dto.geda.annotations.Dto;
import com.inspiresoftware.lib.dto.geda.annotations.DtoField;

import javax.persistence.Column;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;


@Dto("com.tmpt.beans.A1TemplateColumn")
public class A1TemplateColumnDto  implements Serializable{
	private static final long serialVersionUID = 1L;
	
	public static final int dataResource_Normal = 0;
	public static final int dataResource_OptionsTable = 1;
	public static final int dataResource_Sql = 2;
	public static final int dataResource_Page = 3;
	public static final int dataResource_OptionsTableKeyEqualValue = 4;
	public static final int dataResource_ColumnOptionData = 5;//数据字典
	
	@DtoField
	private long id;
	@DtoField
	private String columnName;
	@DtoField
	private String columnShowName;
	@DtoField
	private int columnWidth;
	@DtoField
	private String tableAliasName;//如果不存在，就取table里的这个字段
	@DtoField
	private String columnNameSql;
	@DtoField
	private String columnNameSqlSum;
	@DtoField
	private int isFrozenColumn;
	@DtoField
	private int needSum; // 1:合计列，2:columnNameSqlSum写汉字页面显示
	@DtoField
	private int sort;
	@DtoField
	private int isHidden;
	@DtoField
	private int canAdd;//1:这个字段可以通过页面添加值
	@DtoField
	private int isQuery;//作为查询条件之一
	@DtoField
	private String queryType;
	@DtoField
	private int isSortColumn;//作为排序属性条件之一
	@DtoField
	private String columnType;//列类型：页面生成不同的输入框,PS:date, 页面用日期框，time,页面用时间框，datetime,页面用时间日期框
	@DtoField
	private int dataResource;//数据来源，默认0正常来源，1：取配置数据，2，来SQL执行数据，3，取自定义页面数据
	@DtoField
	private String optionsSql;//select id as key,name as value from table1 where deleteFlag=0
	@DtoField
	private String optionsPage;//zpmng/admin123/right_v2/getCompanyDeptTree.action
	@DtoField
	private String defaultValue;

	@DtoField
	private int lineWidth4AddDialog ;
	@DtoField
	private int inputWidth4AddDialog ;
	@DtoField
	private int required4AddDialog ;
	@DtoField
	private String dataOptions4AddDialog ;
	@DtoField
	private String style4AddDialog ;


	@DtoField
	private int chartType;//1: as categories 2: as dataset
	@DtoField
	private String columnDataType;
	@DtoField
	private String columnTip;
	@DtoField
	private String dataTransfer;
	@DtoField
	private String columnLayoutStyle4adddialog;


	@DtoField
	private int deleteFlag ;//default0,1已删除
	@DtoField(readOnly=true)
	private Timestamp createDate ;
	@DtoField
	private Timestamp modifyDate ;
	@DtoField
	private String createMan ;
	@DtoField
	private String modifyMan ;

	private String queryTypePlaceholder;
	private int hasOptions;//有多选项select?
	private String defaultKey;
	
	private List<A1TemplateColumnOptionDto> a1TemplateColumnOptionDtoList = new ArrayList<A1TemplateColumnOptionDto>();
	private String a1TemplateColumnOptionJsonArray;
	private String a1TemplateColumnOptionJsonArray4Conditin;

	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}

	public String getColumnLayoutStyle4adddialog() {
		return columnLayoutStyle4adddialog;
	}

	public void setColumnLayoutStyle4adddialog(String columnLayoutStyle4adddialog) {
		this.columnLayoutStyle4adddialog = columnLayoutStyle4adddialog;
	}

	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	public String getColumnShowName() {
		return columnShowName;
	}
	public void setColumnShowName(String columnShowName) {
		this.columnShowName = columnShowName;
	}
	public String getColumnNameSql() {
		return columnNameSql;
	}
	public void setColumnNameSql(String columnNameSql) {
		this.columnNameSql = columnNameSql;
	}
	public String getColumnNameSqlSum() {
		return columnNameSqlSum;
	}
	public void setColumnNameSqlSum(String columnNameSqlSum) {
		this.columnNameSqlSum = columnNameSqlSum;
	}
	public int getIsFrozenColumn() {
		return isFrozenColumn;
	}
	public void setIsFrozenColumn(int isFrozenColumn) {
		this.isFrozenColumn = isFrozenColumn;
	}
	public int getNeedSum() {
		return needSum;
	}
	public void setNeedSum(int needSum) {
		this.needSum = needSum;
	}
	public int getSort() {
		return sort;
	}
	public void setSort(int sort) {
		this.sort = sort;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public int getIsHidden() {
		return isHidden;
	}
	public void setIsHidden(int isHidden) {
		this.isHidden = isHidden;
	}
	public int getCanAdd() {
		return canAdd;
	}
	public void setCanAdd(int canAdd) {
		this.canAdd = canAdd;
	}
	public List<A1TemplateColumnOptionDto> getA1TemplateColumnOptionDtoList() {
		return a1TemplateColumnOptionDtoList;
	}
	public void setA1TemplateColumnOptionDtoList(
			List<A1TemplateColumnOptionDto> a1TemplateColumnOptionDtoList) {
		this.a1TemplateColumnOptionDtoList = a1TemplateColumnOptionDtoList;
	}
	public int getIsQuery() {
		return isQuery;
	}
	public void setIsQuery(int isQuery) {
		this.isQuery = isQuery;
	}
	public int getHasOptions() {
		return hasOptions;
	}
	public void setHasOptions(int hasOptions) {
		this.hasOptions = hasOptions;
	}
	public String getDefaultKey() {
		return defaultKey;
	}
	public void setDefaultKey(String defaultKey) {
		this.defaultKey = defaultKey;
	}
	public String getColumnType() {
		return columnType;
	}
	public void setColumnType(String columnType) {
		this.columnType = columnType;
	}
	public int getIsSortColumn() {
		return isSortColumn;
	}
	public void setIsSortColumn(int isSortColumn) {
		this.isSortColumn = isSortColumn;
	}
	public String getOptionsSql() {
		return optionsSql;
	}
	public void setOptionsSql(String optionsSql) {
		this.optionsSql = optionsSql;
	}
	public int getDataResource() {
		return dataResource;
	}
	public void setDataResource(int dataResource) {
		this.dataResource = dataResource;
	}
	public String getOptionsPage() {
		return optionsPage;
	}
	public void setOptionsPage(String optionsPage) {
		this.optionsPage = optionsPage;
	}
	public static int getDataresourceNormal() {
		return dataResource_Normal;
	}
	public static int getDataresourceOptionstable() {
		return dataResource_OptionsTable;
	}
	public static int getDataresourceSql() {
		return dataResource_Sql;
	}
	public static int getDataresourcePage() {
		return dataResource_Page;
	}
	public String getTableAliasName() {
		return tableAliasName;
	}
	public void setTableAliasName(String tableAliasName) {
		this.tableAliasName = tableAliasName;
	}
	public int getColumnWidth() {
		return columnWidth;
	}
	public void setColumnWidth(int columnWidth) {
		this.columnWidth = columnWidth;
	}
	public int getDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	public Timestamp getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}
	public Timestamp getModifyDate() {
		return modifyDate;
	}
	public void setModifyDate(Timestamp modifyDate) {
		this.modifyDate = modifyDate;
	}
	public String getCreateMan() {
		return createMan;
	}
	public void setCreateMan(String createMan) {
		this.createMan = createMan;
	}
	public String getModifyMan() {
		return modifyMan;
	}
	public void setModifyMan(String modifyMan) {
		this.modifyMan = modifyMan;
	}
	public static int getDataresourceOptionstablekeyequalvalue() {
		return dataResource_OptionsTableKeyEqualValue;
	}
	public int getLineWidth4AddDialog() {
		return lineWidth4AddDialog;
	}
	public void setLineWidth4AddDialog(int lineWidth4AddDialog) {
		this.lineWidth4AddDialog = lineWidth4AddDialog;
	}
	public int getInputWidth4AddDialog() {
		return inputWidth4AddDialog;
	}
	public void setInputWidth4AddDialog(int inputWidth4AddDialog) {
		this.inputWidth4AddDialog = inputWidth4AddDialog;
	}
	public int getRequired4AddDialog() {
		return required4AddDialog;
	}
	public void setRequired4AddDialog(int required4AddDialog) {
		this.required4AddDialog = required4AddDialog;
	}
	public String getDataOptions4AddDialog() {
		return dataOptions4AddDialog;
	}
	public void setDataOptions4AddDialog(String dataOptions4AddDialog) {
		this.dataOptions4AddDialog = dataOptions4AddDialog;
	}
	public String getStyle4AddDialog() {
		return style4AddDialog;
	}
	public void setStyle4AddDialog(String style4AddDialog) {
		this.style4AddDialog = style4AddDialog;
	}
	public int getChartType() {
		return chartType;
	}
	public void setChartType(int chartType) {
		this.chartType = chartType;
	}
	public String getA1TemplateColumnOptionJsonArray() {
		return a1TemplateColumnOptionJsonArray;
	}
	public void setA1TemplateColumnOptionJsonArray(
			String a1TemplateColumnOptionJsonArray) {
		this.a1TemplateColumnOptionJsonArray = a1TemplateColumnOptionJsonArray;
	}

	public String getQueryType() {
		return queryType;
	}

	public void setQueryType(String queryType) {
		this.queryType = queryType;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}


	public String getColumnTip() {
		return columnTip;
	}

	public void setColumnTip(String columnTip) {
		this.columnTip = columnTip;
	}

	public String getColumnDataType() {
		return columnDataType;
	}

	public String getDataTransfer() {
		return dataTransfer;
	}

	public void setDataTransfer(String dataTransfer) {
		this.dataTransfer = dataTransfer;
	}

	public void setColumnDataType(String columnDataType) {
		this.columnDataType = columnDataType;
	}

	public String getQueryTypePlaceholder() {
		return queryTypePlaceholder;
	}

	public void setQueryTypePlaceholder(String queryTypePlaceholder) {
		this.queryTypePlaceholder = queryTypePlaceholder;
	}

	public String getA1TemplateColumnOptionJsonArray4Conditin() {
		return a1TemplateColumnOptionJsonArray4Conditin;
	}

	public void setA1TemplateColumnOptionJsonArray4Conditin(String a1TemplateColumnOptionJsonArray4Conditin) {
		this.a1TemplateColumnOptionJsonArray4Conditin = a1TemplateColumnOptionJsonArray4Conditin;
	}
}
